<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewPersonTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.firstName}:"/>
                    <h:outputText value="#{personController.selected.firstName}" title="#{bundle.firstName}"/>
                    <h:outputText value="#{bundle.lastName}:"/>
                    <h:outputText value="#{personController.selected.lastName}" title="#{bundle.lastName}"/>
                    <h:outputText value="#{bundle.phoneNumber}:"/>
                    <h:outputText value="#{personController.selected.phoneNumber}" title="#{bundle.phoneNumber}"/>
                    <h:outputText value="#{bundle.emailAddress}:"/>
                    <h:outputText value="#{personController.selected.emailAddress}" title="#{bundle.emailAddress}"/>
                    <h:outputText value="#{bundle.username}:"/>
                    <h:outputText value="#{personController.selected.users.username}" title="#{bundle.username}"/>
                    <h:outputText value="#{bundle.teacher}:"/>
                    <h:selectBooleanCheckbox value='#{personController.selected.users.teacher}' disabled='true'/>
                    <h:outputText value="#{bundle.instAdmin}:"/>
                    <h:selectBooleanCheckbox value='#{personController.selected.users.instAdmin}' disabled='true'/>
                    <h:outputText value="#{bundle.sysAdmin}:"/>
                    <h:selectBooleanCheckbox value='#{personController.selected.users.sysAdmin}' disabled='true'/>
                    
                    <h:outputText value="#{bundle.worksAtInstitution}:" />
                    <h:dataTable value="#{personController.selected.institutionCollection}" title="#{bundle.worksAtInstitution}" var="inst" border="0" cellpadding="2" cellspacing="0" rules="all" style="border:solid 0px">
                        <h:column>
                            <h:outputText value="#{inst.institutionName}"/>
                        </h:column>
                    </h:dataTable>
                </h:panelGrid>
                <br />
                <h:commandLink action="person/Edit" value="#{bundle.EDIT}"/>
                <br />
                <h:commandLink action="#{personController.prepareList}" value="#{bundle.SHOW_ALL}"/>


            </h:form>
        </ui:define>
    </ui:composition>

</html>
